package com.zhongwang.mms.module.purchase.dao;

import com.zhongwang.mms.module.purchase.model.POrder;
import com.zhongwang.mms.module.purchase.model.POrderDetail;
import com.zhongwang.mms.module.purchase.model.POrderQueryPrintModel;
import com.zhongwang.mms.module.purchase.model.PurWarQueryModel;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository

public interface PurWarQueryDao {
    /**
     * selectByParam
     * 加载出入库列表以及综合查询
     * @param param 查询条件
     * @return
     */
    List<PurWarQueryModel> selectByParam(PurWarQueryModel param);
    /**
     * selectByParam
     * 跳转显示出入库单据
     * @param param 查询条件
     * @return
     */
    List<PurWarQueryModel> findOdaListByOdrId(PurWarQueryModel param);

    POrderQueryPrintModel getOrderByOdrId(Integer odrId);

    /**
     * 查看入库
     * @param odrId
     * @return
     */
    List<POrderDetail> getOrderInByOdrId(Integer odrId);

    /**
     * 查看出库
     * @param odrId
     * @return
     */
    List<POrderDetail> getOrderOutByOdrId(Integer odrId);

    void createWarQueryTempTable(PurWarQueryModel param);

    Integer getTempTableDataCount(PurWarQueryModel param);

    List<PurWarQueryModel> selectWarQueryTempTableByParam(PurWarQueryModel param);

    List<PurWarQueryModel> selectWarQueryTempTableByParamAndNoAmount(PurWarQueryModel param);

    void dropWarQueryTempTable(String tempTableName);

    List<PurWarQueryModel> findPurWarList(PurWarQueryModel param);

    List<PurWarQueryModel> purInWarQueryList(PurWarQueryModel param);

    String getMonthlyConsumptionOfYingkouInventoryAndAmount(String whiIds);

    int createWarQueryTempTableByParam(PurWarQueryModel param);

    int createWarQueryTempTableByParamAndNoAmount(PurWarQueryModel param);
}
